<?php
class Sabai_Template_Default_Helper_XiggBreadCrumb extends Sabai_Template_Default_Helper
{
    function execute(&$config, $linkSelf = true)
    {
        if (SABAI_URL_DIR != $homepage_url = $config->get('homepageURL')) {
            $html[] = sprintf('<a href="%s">%s</a>', $homepage_url, h(_('Home')));
        }
        if (!$linkSelf) {
            $html[] = h($config->get('toppageTitle'));
        } else {
            $html[] = sprintf('<a href="%s">%s</a> &#8250; ', Sabai_URL::get(), h($config->get('toppageTitle')));
        }
        return implode(' &#8250; ', $html);
    }
}